<?php
class Del extends Controller {
	public function json() {
		$roleId = $this->post('roleId', 'int');
				
		if(!$roleId) $this->displayJSON(array('status' => -1, 'message' => '未知角色ID'));
		
		$mRole = new Role_model();
		$params = array('role_id' => $roleId);
		$result = $mRole->deleteRole($params);
		if($result) $this->displayJSON(array('status' => 0, 'message' => '删除角色成功'));
		else $this->displayJSON(array('status' => -2, 'message' => '删除角色失败'));
	}
}